import axios from 'axios'

export default {
  namespaced: true,
  state: {
    qiniuToken: ''
  },
  mutations: {
    async GET_QINIUTOKEN(state) {
      await axios('api/token').then(res => {
        state.qiniuToken = res.data
      })
    }
  },
  actions: {
    getToken(context) {
      context.commit('GET_QINIUTOKEN')
    }
  }
}
